home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / ActiveX Controlls / XP Suite / DATA1.CAB / XP_Progress_Sample_Files / Form1.frm (.txt) next >
Encoding:
Visual Basic Form  |  2003-04-24  |  4.7 KB  |  160 lines

  1. VERSION 5.00
  2. Object = "{D1212DE2-1920-413F-833E-9DE3B4743ED2}#1.0#0"; "ciaXPProgress.ocx"
  3. Begin VB.Form Form1 
  4.    BackColor       =   &H00FFFFFF&
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3045
  7.    ClientLeft      =   60
  8.    ClientTop       =   450
  9.    ClientWidth     =   7950
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   3045
  12.    ScaleWidth      =   7950
  13.    StartUpPosition =   3  'Windows Default
  14.    Begin ciaXPProgress.ProgressBar ProgressBar1 
  15.       Height          =   195
  16.       Left            =   330
  17.       TabIndex        =   9
  18.       Top             =   2115
  19.       Width           =   4500
  20.       _ExtentX        =   7938
  21.       _ExtentY        =   344
  22.       GradientFrom    =   3724597
  23.       GradientTo      =   11333035
  24.       HighLightOnFull =   -1  'True
  25.       HighLightColorFrom=   255
  26.       LicValid        =   -1  'True
  27.    End
  28.    Begin ciaXPProgress.ProgressWait ProgressWait1 
  29.       Height          =   195
  30.       Left            =   315
  31.       TabIndex        =   8
  32.       Top             =   465
  33.       Width           =   4500
  34.       _ExtentX        =   7938
  35.       _ExtentY        =   344
  36.       GradientFrom    =   3724597
  37.       GradientTo      =   11333035
  38.       LicValid        =   -1  'True
  39.    End
  40.    Begin VB.ComboBox cboDir 
  41.       Height          =   315
  42.       Index           =   1
  43.       Left            =   5385
  44.       TabIndex        =   6
  45.       Text            =   "Combo1"
  46.       Top             =   2100
  47.       Width           =   2325
  48.    End
  49.    Begin VB.ComboBox cboDir 
  50.       Height          =   315
  51.       Index           =   0
  52.       Left            =   5385
  53.       TabIndex        =   4
  54.       Text            =   "Combo1"
  55.       Top             =   1050
  56.       Width           =   2325
  57.    End
  58.    Begin VB.Timer Timer1 
  59.       Interval        =   200
  60.       Left            =   4650
  61.       Top             =   2580
  62.    End
  63.    Begin VB.CommandButton Command1 
  64.       Caption         =   "Start"
  65.       Height          =   495
  66.       Left            =   5385
  67.       TabIndex        =   1
  68.       Top             =   255
  69.       Width           =   1215
  70.    End
  71.    Begin VB.CommandButton Command2 
  72.       Caption         =   "Stop"
  73.       Height          =   495
  74.       Left            =   6645
  75.       TabIndex        =   0
  76.       Top             =   255
  77.       Width           =   1215
  78.    End
  79.    Begin VB.Label Label3 
  80.       BackStyle       =   0  'Transparent
  81.       Caption         =   "Direction"
  82.       Height          =   255
  83.       Index           =   1
  84.       Left            =   5385
  85.       TabIndex        =   7
  86.       Top             =   1875
  87.       Width           =   1215
  88.    End
  89.    Begin VB.Label Label3 
  90.       BackStyle       =   0  'Transparent
  91.       Caption         =   "Direction"
  92.       Height          =   255
  93.       Index           =   0
  94.       Left            =   5385
  95.       TabIndex        =   5
  96.       Top             =   825
  97.       Width           =   1215
  98.    End
  99.    Begin VB.Label Label1 
  100.       AutoSize        =   -1  'True
  101.       BackStyle       =   0  'Transparent
  102.       Caption         =   "Label1"
  103.       Height          =   195
  104.       Left            =   300
  105.       TabIndex        =   3
  106.       Top             =   150
  107.       Width           =   480
  108.    End
  109.    Begin VB.Label Label2 
  110.       AutoSize        =   -1  'True
  111.       BackStyle       =   0  'Transparent
  112.       Caption         =   "Label2"
  113.       Height          =   195
  114.       Left            =   300
  115.       TabIndex        =   2
  116.       Top             =   1845
  117.       Width           =   480
  118.    End
  119. Attribute VB_Name = "Form1"
  120. Attribute VB_GlobalNameSpace = False
  121. Attribute VB_Creatable = False
  122. Attribute VB_PredeclaredId = True
  123. Attribute VB_Exposed = False
  124. Private Sub cboDir_Click(Index As Integer)
  125. Select Case Index
  126.     Case 0
  127.         ProgressWait1.Direction = cboDir(0).ListIndex
  128.     Case 1
  129.         ProgressBar1.Direction = cboDir(1).ListIndex
  130.         ProgressBar1.Value = 0
  131.         Label2 = "Current Percent: " & ProgressBar1.Value
  132.         Timer1.Enabled = True
  133. End Select
  134. End Sub
  135. Private Sub Command1_Click()
  136. Label1 = "Please Wait......"
  137. ProgressWait1.pStart
  138. End Sub
  139. Private Sub Command2_Click()
  140. Label1 = "Finished"
  141. ProgressWait1.pStop
  142. End Sub
  143. Private Sub Form_Load()
  144. Label1 = "": Label2 = ""
  145. cboDir(0).AddItem "0 - Left to Right"
  146. cboDir(0).AddItem "1 - Right to Left"
  147. cboDir(0).AddItem "2 - Both"
  148. cboDir(1).AddItem "0 - Left to Right"
  149. cboDir(1).AddItem "1 - Right to Left"
  150. cboDir(0).ListIndex = 0
  151. cboDir(1).ListIndex = 0
  152. End Sub
  153. Private Sub Timer1_Timer()
  154. If ProgressBar1.Value >= 100 Then
  155.     Timer1.Enabled = False
  156.     ProgressBar1.Value = ProgressBar1.Value + 10
  157. End If
  158. Label2 = "Current Percent: " & ProgressBar1.Value
  159. End Sub
  160.